//
//  CustomLoginView.h
//  WeCommunity
//
//  Created by mac on 2017/6/20.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger,LoginCustomUIType) {
    Type_Login = 0,
    Type_Register = 1,
    
};

@protocol LoginViewDelegate <NSObject>

-(void)LoginViewProcessBtn:(NSInteger )btnIndex; // 0：登录 1:注册

-(void)processUserAgreemnntBtn; //点击用户协议

@end

@interface CustomLoginView : UIView

@property (nonatomic,assign) id<LoginViewDelegate> delegate;

@property (nonatomic,assign) LoginCustomUIType customUIType;

@property (nonatomic,strong) NSString * username;

@property (nonatomic,strong) NSString * password;


-(instancetype)initWithFrame:(CGRect)frame withType:(LoginCustomUIType)type;

#pragma mark - 收回键盘
-(void)hiddenKeyBoard;

#pragma mark - 显示键盘
-(void)showKeyBoard;

-(void)setloginButtonEnabled:(BOOL)enabled;

-(void)verifyTetxFieldContent;

@end
